package com.spring.test.service.impl;

import com.spring.test.dao.RoleDao;
import com.spring.test.domain.Role;
import com.spring.test.service.RoleService;

import java.util.List;

public class RoleServiceImpl implements RoleService {

    private RoleDao dao;

    public void setDao(RoleDao dao) {
        this.dao = dao;
    }

    @Override
    public List<Role> list() {
        List<Role> roleList =  dao.findAll();
        return roleList;
    }

    @Override
    public void save(Role role) {
        dao.save(role);
    }

}
